//
//  YAWebViewController.swift
//  KeepCliming
//
//  Created by 鱼龙之梦 on 15/9/20.
//  Copyright © 2015年 panyanzhi. All rights reserved.
//

import UIKit
import SVProgressHUD
class YAWebViewController: UIViewController {
    var url:NSURL?{
        didSet{
            webView.loadRequest(NSURLRequest(URL: url!))
            webView.delegate = self
            SVProgressHUD.showWithStatus("正在加载...")
        }
    }
    private lazy var webView = UIWebView()
    override func viewDidLoad() {
        super.viewDidLoad()
        title = "网页详情"
        navigationItem.titleView = UILabel(title: title, color: UIColor.darkGrayColor(), fontSize: 18)
        
    }

    override func loadView() {
        view = webView
    }
    override func viewDidDisappear(animated: Bool) {
        super.viewDidDisappear(animated)
        SVProgressHUD.dismiss()
    }
}
extension YAWebViewController:UIWebViewDelegate
{
    func webViewDidFinishLoad(webView: UIWebView) {
        SVProgressHUD.dismiss()
    }
}